﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using COFE.Core.Filter;

namespace COFE.Data.Filter
{
    /// <summary>
    /// Take a Entity framework query and a IFilter, 
    /// update the query based on the filter, and return.
    /// </summary>
    public interface IFilterExpression<T>
        where T : IFilter
    {
        /// <summary>
        /// Supported filter type.
        /// </summary>
        Type SupportedType { get; }

        IQueryable<Entry> ProcessQuery(IQueryable<Entry> input,
            T filter, IOptionFilter[] options);

        IEnumerable<Entry> ProcessQueryOutput(IEnumerable<Entry> input,
            T filter, IOptionFilter[] options);
    }
}
